import request from '@/utils/request'

/**
 * 查询user
 * @param {page,size,orderBys,columParams} data
 */
const search = function(data) {
  return request({
    url: '/web/admin/role!search',
    method: 'post',
    data
  })
}

/**
 * 创建demo对象
 * @param {address,birthday,email,name,phone,sex,type} data
 */
const create = function(data) {
  return request({
    url: '/web/admin/role',
    method: 'post',
    data
  })
}

/**
 * 更新demo对象
 * @param {address,birthday,email,name,phone,sex,type} data
 */
const update = function(data) {
  return request({
    url: '/web/admin/role',
    method: 'put',
    data
  })
}

const apiRole = {
  search,
  create,
  update
}

/**
 * 将demo模块的api打包输出
 */
export default apiRole
